<!DOCTYPE html>
<html>
<head>
	<title>{$name} {$seo_title} {$site_name}</title>
	<meta name="keywords" content="{$seo_keywords}" />
	<meta name="description" content="{$seo_description}">
	<tc_include file="Public:head" />
</head>
<body class="body-blue">
	<tc_include file="Public:nav" />
	<div class="container">
		<div class="pg-opt pin">
			<div class="container">
				<h2>{$name}</h2>
			</div>
		</div>
		<div class="container">
			<div>
				<php>
					$lists = sp_sql_posts_paged("cid:$cat_id;order:post_date
				ASC;",20);
				</php>
				<div id="container">
					<div class="grid-sizer"></div>
					<volist name="lists['posts']" id="vo">
						<php>$smeta=json_decode($vo['smeta'], true);</php>

						<div class="item">
							<div class="tc-gridbox">
								<div class="header">

									<if condition="!empty($smeta['thumb'])">
										<div class="item-image">

											<img src="{:sp_get_asset_upload_path($smeta['thumb'])}"
										class="img-responsive" alt="{$vo.post_title}"></div>
										<else />
									</if>

									<h3>

										<a href="{:leuu('article/index',array('id'=>$vo['tid'],'cid'=>$vo['term_id']))}">
										{$vo.post_title}</a>
									</h3>
									<hr>
									</div>
								<div class="body">
									<a>{$vo.post_excerpt|msubstr=0,256}</a>
								</div>
								<div class="footer">

									<div class="pull-left">
										<span class="meta">{$vo.post_date}</span>
									</div>
									<div class="pull-right">
										<a href="javascript:;"> <i class="fa fa-eye"></i>
											<span>{$vo.post_hits}</span>
										</a>
										<a href="{:U('article/do_like',array('id'=>
											$vo['object_id']))}" class="js-count-btn"> <i class="fa fa-thumbs-up"></i>
											<span class="count">{$vo.post_like}</span>
										</a>
										<a href="{:U('user/favorite/do_favorite',array('id'=>
											$vo['object_id']))}" class="js-favorite-btn" data-title="{$vo.post_title}" data-url="{:leuu('portal/article/index',array('id'=>$vo['tid'],'cid'=>$vo['term_id']))}" data-key="{:sp_get_favorite_key('posts',$vo['object_id'])}">
											<i class="fa fa-star-o"></i>
										</a>

								<!--    <a href="{:leuu('article/index',array('id'=>
											$vo['object_id']))}" class="js-favorite-btn" data-url="{:leuu('portal/article/index',array('id'=>$vo['tid'],'cid'=>$vo['term_id']))}" >
											<i class="fa  fa-video-camera"></i>观看 
										</a> -->


									</div>
								</div>
						<!-- 		<div class="footer">
									<form class="js-ajax-form" action="{:U('article/index',array('id'=>
										$vo['tid'],'cid'=>$vo['term_id']))}" method="get">
										<input type="text"  id="input_usercode" name="usercode" placeholder="请输入观看码"  style="width: 65%;margin: 10px 5px  5px 0px;">
										<button class="btn btn-primary js-ajax-submit" type="submit" >确定</button>

									</form>
								</div> -->
								<div class="clearfix"></div>
							</div>
						</div>
				</volist>
			</div>
			<div class="pagination">
				<ul>{$lists['page']}</ul>
			</div>
		</div>
	</div>
</div>

<tc_include file="Public:footer" />

<!-- JavaScript -->
<tc_include file="Public:scripts" />
<script src="__TMPL__Public/js/imagesloaded.pkgd.min.js"></script>
<script src="__TMPL__Public/js/masonry.pkgd.min.js"></script>
<script>
		var $container = $('#container').masonry({
			columnWidth : '.grid-sizer',
			itemSelector : '.item'
		});
		// layout Masonry again after all images have loaded
		$container.imagesLoaded(function() {
			$container.masonry();
		});
	</script>
</body>
</html>